package sq.util;


import org.springframework.stereotype.Service;

import java.util.Random;

/**
 * @Author sunquan
 */
@Service
public class VerificationCodeImpl implements VerificationCodeService {
    private Random random = new Random();

    public String getVerificationCode() {
        //验证码
        StringBuilder stringBuilder = new StringBuilder("");
        for (int i = 0; i < 6; i++) {
            stringBuilder.append(random.nextInt(9));
        }
        return stringBuilder.toString();
    }
}
